package com.cml.dm.admin.event;

import com.cml.dm.admin.entity.DmExeLogger;
import com.cml.dm.admin.service.TaskExecutorServiceFactory;

public class TaskRunable  implements  Runnable{
    private TaskExecutorServiceFactory taskExecutorServiceFactory;
    private DmExeLogger dmExeLogger;
    private Object extParameters;

    public TaskRunable(TaskExecutorServiceFactory taskExecutorServiceFactory,DmExeLogger dmExeLogger,Object extParameters){
        this.dmExeLogger = dmExeLogger;
        this.extParameters = extParameters;
        this.taskExecutorServiceFactory = taskExecutorServiceFactory;
    }
    @Override
    public void run() {
        taskExecutorServiceFactory.getTaskExecutorService(dmExeLogger).execute(dmExeLogger,extParameters);
    }
}
